package easy.id_301_400;


//2024年5.22写
public class Lee344 {
    public static void main(String[] args) {
        char[] s={'h','e','l','l','o'};
        reverseString(s);
        for(char item : s){
            System.out.println(item);
        }
    }
    static public void reverseString(char[] s) {
        int l=0;
        int r=s.length-1;
        while(l<=r){
            char c=s[l];
            s[l]=s[r];
            s[r]=c;
            l++;
            r--;
        }
    }

}
